package com.flea.hclv.model.dao;

import com.flea.hclv.model.entity.HSpot;
import com.flea.hclv.model.entity.SpotTicket;
import com.flea.system.entity.OrgDept;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface SpotTicketMapper {
    int deleteByPrimaryKey(String id);

    int insert(SpotTicket record);

    int insertSelective(SpotTicket record);

    SpotTicket selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(SpotTicket record);

    int updateByPrimaryKey(SpotTicket record);

    List<SpotTicket> selectBySpotIdOrDeptId(@Param("deptUuid") String deptUuid, @Param("spotId") String spotId);

    int deleteByIds(@Param("ids") List<String> ids, @Param("userId") String userId);

    List<SpotTicket> selectAll(RowBounds bounds);

    List<SpotTicket> selectBySpotId(@Param("spotId") String spotId, RowBounds bounds, @Param("deptUuid") String deptUuid);

    List<SpotTicket> selectByUuids(RowBounds rowBounds, @Param("list") List<String> spotIds, @Param("deptUuid") String deptUuid);

    List<SpotTicket> selectBySpotIdAndDeptId(@Param("spotId") String spotId, @Param("deptUuid") String deptUuid,
                                             @Param("type") String type);

    List<SpotTicket> selectByDeptIdList(@Param("serviceTypes") List<OrgDept> serviceTypes, RowBounds rowBounds,
                                        @Param("spotName") String spotName);

    int selectByTypeAndDeptId(@Param("deptUuid") String deptUuid, @Param("ticketType") String ticketType);

    List<SpotTicket> selectByDeptId(@Param("deptUuid") String deptUuid, RowBounds rowBounds,
                                    @Param("spotId") String spotId,
                                    @Param("spots") List<HSpot> spots);

    SpotTicket selectByUuidLimit(String spotId);

    List<SpotTicket> selectByAllUuids(@Param("spots") List<HSpot> spots);
}